/**
 * Copyright (c) 2015-2030 by Beijing Yanlight Co., Ltd.
 * All rights reserved.
 */
package com.yanlight.app.response;

import com.yanlight.Constants;

/**
 * 
 * @author haolw
 * @time 2017/08/18
 */
public class PageResponse {
	private int pageSize = Constants.DEFAULT_PAGE_SIZE;
	private int totalRecord;
	private int totalPage;

	public int getPageSize() {
		return pageSize;
	}

	public void setPageSize(int pageSize) {
		this.pageSize = pageSize;
	}

	public int getTotalRecord() {
		return totalRecord;
	}

	public void setTotalRecord(int totalRecord) {
		this.totalRecord = totalRecord;
	}

	public int getTotalPage() {
		totalPage = (totalRecord + pageSize - 1) / pageSize;
		return totalPage;
	}

	public void setTotalPage(int totalPage) {
		this.totalPage = totalPage;
	}
}
